#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QWebSocket>

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();
    void ClientHasPong(quint64 a, QByteArray b);
    void AppendLog(QString t);
    void ViewSendText(QString t);
    void ViewRecvText(QString t);
public slots:
    void onConnexted();
    void textFrameReceived(QString a, bool b);
    void textMessageReceived(QString a);
    void binaryFrameReceived(QByteArray a, bool b);
    void binaryMessageReceived(QByteArray a);
    void onDisConnexted();
private slots:
    void on_pushButton_connect_clicked();
    void on_pushButton_send_clicked();

    void on_pushButton_ping_clicked();

private:
    Ui::MainWindow *ui;
    QWebSocket *m_websock;
    QTcpSocket *m_socket;
};
#endif // MAINWINDOW_H
